<?php /* Smarty version Smarty-3.1.11, created on 2013-03-13 12:13:54
         compiled from ".\smarty\templates\booking_step_two.tpl" */ ?>
<?php /*%%SmartyHeaderCode:18813513c982b3d9048-74816800%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '60119355c0630126463ff60a60071a1bbefe5e7c' => 
    array (
      0 => '.\\smarty\\templates\\booking_step_two.tpl',
      1 => 1363173231,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '18813513c982b3d9048-74816800',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.11',
  'unifunc' => 'content_513c982b9f78b0_25927495',
  'variables' => 
  array (
    'startYear' => 0,
    'endYear' => 0,
    'countries' => 0,
    'country' => 0,
    'states' => 0,
    'state' => 0,
    'cancellationPolicy' => 0,
    'hotelinfo' => 0,
    'contactinfo' => 0,
    'ind' => 0,
    'guest' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_513c982b9f78b0_25927495')) {function content_513c982b9f78b0_25927495($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'D:\\xampp\\smarty\\libs\\plugins\\modifier.date_format.php';
?><div id="booking_step2" class="active">
    <form action="book.php" method="POST" >
    <table width="100%" cellspacing="0" border="0">
        <tr class="row"><td><h2 style="color:#000;">Credit Card Information</h2></td></tr>
        <tr><td><label>Card Type:</label></td></tr>
        <tr>
            <td>
                <input id="creditCardInformation.cardType.continue" type="hidden" value="0" />
                <select name="creditCardInformation.cardType" 
                        onChange="checkCardType(this, 'erorCardType', 'creditCardInformation.cardType.continue');" />
                    <option value="VI">Visa</option>
                    <option value="CA">MasterCard</option>
                    <option value="" selected="selected">- Select Your Card Type -</option>
                </select>
                <div class="error" id="erorCardType"></div>
            </td>
        </tr>
        <tr><td><label>Card Number</label></td></tr>
        <tr>
            <td>
                <input id="creditCardInformation.creditCardNumber.continue" type="hidden" value="0" autocomplete="off" />
                <input maxlength="19" name="creditCardInformation.cardNumber" 
                       autocomplete="off" type="text" 
                       onBlur="checkCreditCardNumber(this, 'creditCardError', 'creditCardInformation.creditCardNumber.continue');" />
                <div class="error" id="creditCardError"></div>
            </td>
        </tr>
        <tr><td><label>Cardholder First Name</label></td></tr>
        <tr>
            <td>
                <input id="creditCardInformation.cardHolderFirstName.continue" type="hidden" 
                       value="0" />
                <input maxlength="100" autocomplete="off" 
                       name="cerditCardInformation.cardHolderFirstName" 
                       value="" type="text" 
                       onBlur="checkNameValidity(this, 'errorCardHolderFirstName', 'creditCardInformation.cardHolderFirstName.continue');" />
                <div class="error" id='errorCardHolderFirstName'></div>
            </td>
        </tr>
        <tr><td><label>Cardholder Last Name</label></td></tr>
        <tr>
            <td>
                <input id="creditCardInformation.cardHolderLastName.continue" type="hidden" 
                       value="0" />
                <input maxlength="100" name="creditCardInformation.cardHolderLastName" autocomplete="off" 
                       value="" type="text" 
                       onBlur="checkNameValidity(this, 'errorCardHolderLastName', 'creditCardInformation.cardHolderLastName.continue');" />
                <div class="error" id="errorCardHolderLastName"></div>
            </td>
        </tr>
        <tr><td><label for="expiration-date" on> Expiration Date</label></td></tr>
        <tr>
            <td>
                <!--(yearobj,monthId,errorId,idValidity,idValidityYear,idValidityMonth)-->
                <input id="creditCardInformation.expirationDate.Month.continue" type="hidden" value="0" />
                <input id="creditCardInformation.expirationDate.Year.continue" type="hidden" value="0" />
                <input id="creditCardInformation.expirationDate.continue" type="hidden" value="0" />

                <select name="creditCardInformation.expirationDate.month" 
                        id='creditCardInformation.ExpirationDate.Month' 
                        onChange="checkExpirationDateMonth('creditCardInformation.expirationDate.year', 'creditCardInformation.ExpirationDate.Month', 'errorCreditCardExpirationDate', 'creditCardInformation.expirationDate.continue', 'creditCardInformation.expirationDate.Year.continue', 'creditCardInformation.expirationDate.Month.continue');">
                    <option value="" selected="selected">-- Month -</option>
                    <option value="01">01-January</option>
                    <option value="02">02-February</option>
                    <option value="03">03-March</option>
                    <option value="04">04-April</option>
                    <option value="05">05-May</option>
                    <option value="06">06-June</option>
                    <option value="07">07-July</option>
                    <option value="08">08-August</option>
                    <option value="09">09-September</option>
                    <option value="10">10-October</option>
                    <option value="11">11-November</option>
                    <option value="12">12-December</option>
                </select>
                <?php $_smarty_tpl->tpl_vars['startYear'] = new Smarty_variable(smarty_modifier_date_format(time(),"%Y"), null, 0);?>
                <?php $_smarty_tpl->tpl_vars['endYear'] = new Smarty_variable($_smarty_tpl->tpl_vars['startYear']->value+10, null, 0);?>
                <select name="creditCardInformation.expirationDate.year" 
                        id="creditCardInformation.expirationDate.year" 
                        onChange="checkExpirationDate(this, 'creditCardInformation.ExpirationDate.Month', 'errorCreditCardExpirationDate', 'creditCardInformation.expirationDate.continue', 'creditCardInformation.expirationDate.Year.continue', 'creditCardInformation.expirationDate.Month.continue');" >
                    <option value="" selected="selected">- Year -</option>
                    <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['name'] = 'yearValue';
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'] = (int)$_smarty_tpl->tpl_vars['startYear']->value;
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['endYear']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'] = ((int)1) == 0 ? 1 : (int)1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['loop'];
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'] < 0)
    $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'] = max($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'] > 0 ? 0 : -1, $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['loop'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start']);
else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'] = min($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['loop'] : $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['loop']-1);
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['total'] = min(ceil(($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['loop'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'] : $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start']+1)/abs($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'])), $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['max']);
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['yearValue']['total']);
?>
                        <option value="<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['yearValue']['index'];?>
"><?php echo $_smarty_tpl->getVariable('smarty')->value['section']['yearValue']['index'];?>
</option>
                    <?php endfor; endif; ?>

                </select>
                <div class="error" id="errorCreditCardExpirationDate"></div>
            </td>
        </tr>
        <tr><td><label for="security-code">Security Code</label></td></tr>
        <tr>
            <td>  
                <input id="creditCardInformation.securityCode.continue" type="hidden" value="0" />
                <input maxlength="4" name="creditCardInformation.securityCode" autocomplete="off" type="text" onBlur="checkCardSecurityCode(this, 'errorCardSecurityCode', 'creditCardInformation.securityCode.continue');" />
                <div class="error" id="errorCardSecurityCode"></div>
            </td>
        </tr>
        <tr><td class="row"><h2 style="color:#000;">Billing Address:</h2></td></tr>
        <tr><td><p class="checkout-info-label">The billing address provided must match the credit card that is used to reserve your room.</p></td></tr>
        <tr><td><label>Country</label></td></tr>
        <tr>
            <td>
                <select name="billingAdress.country" id="country_select" class="select countries-list index" 
                        onChange="checkCountry(this, 'stateField', 'stateLebel', 'billingAdress.stateField.continue');">
                    <?php  $_smarty_tpl->tpl_vars['country'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['country']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['countries']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['country']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['country']->key => $_smarty_tpl->tpl_vars['country']->value){
$_smarty_tpl->tpl_vars['country']->_loop = true;
 $_smarty_tpl->tpl_vars['country']->index++;
 $_smarty_tpl->tpl_vars['country']->first = $_smarty_tpl->tpl_vars['country']->index === 0;
?>
                    <option value="<?php echo $_smarty_tpl->tpl_vars['country']->value['CountryCode'];?>
"   <?php if ($_smarty_tpl->tpl_vars['country']->first){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['country']->value['CountryName'];?>
</option>
                    <?php } ?>                                                 
                </select>
            </td>
        </tr>
        <tr><td><label for="street-address">Street Address</label></td></tr>
        <tr>
            <td>
                <input id="billingAddress.streetAddres.part1.continue" type="hidden" value="" />
                <input maxlength="50" name="billingAddress.streetAddres.part1" type="text" value="" onBlur="checkStreetValidity(this, 'errorStreetAddres', 'billingAddress.streetAddres.part1.continue')" onLoad="checkStreetValidity(this, 'errorStreetAddres', 'billingAddress.streetAddres.part1.continue')" />
                <div id='errorStreetAddres' class="error"></div>
            </td>
        </tr>
        <tr><td><input type="hidden" maxlength="50" name="billingAddress.streetAddres.part2" /></td></tr>
        <tr><td><label>City</label></td></tr>
        <tr>
            <td>
                <input id="billingAdress.city.continue" type="hidden" value="" />
                <input  maxlength="20" name="billingAddress.city" type="text" value="" onBlur="checkCityValidity(this, 'errorCity', 'billingAdress.city.continue')" />
                <div id='errorCity' class="error">
                </div>
            </td>
        </tr>
        <tr><td><label>Postal / Zip Code</label></td></tr>
        <tr>
            <td>
                <input id="billingAdress.zipCode.continue" type="hidden" value="" onBlur="checkZipCode(this, 'errorZipCode', 'billingAdress.zipCode.continue')" />
                <input maxlength="20" name="billingAddress.zipCode" type="text" value="" onblur="checkZipCode(this,'errorZipCode','billingAdress.zipCode.continue')">
                <div class="error" id="errorZipCode">
                </div>
            </td>
        </tr>
        <tr class="active" id="stateLebel"><td><label>State</label></td></tr>
        <tr id="stateField" class="active">
            <td>
                <input id="billingAdress.stateField.continue" type="hidden" value="1" />
                <select id="country_US_states" name="billingAddress.state" onChange="checkState(this, 'stateFieldError', 'billingAdress.stateField.continue')">
                <?php  $_smarty_tpl->tpl_vars['state'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['state']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['states']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['state']->key => $_smarty_tpl->tpl_vars['state']->value){
$_smarty_tpl->tpl_vars['state']->_loop = true;
?>
                    <?php if ($_smarty_tpl->tpl_vars['state']->value['CountryId']==201){?>
                        <option value="<?php echo $_smarty_tpl->tpl_vars['state']->value['StateCode'];?>
"><?php echo $_smarty_tpl->tpl_vars['state']->value['StateName'];?>
, <?php echo $_smarty_tpl->tpl_vars['state']->value['StateCode'];?>
</option>
                    <?php }?>
                <?php } ?>
                </select>
                <div class="error" id='stateFieldError'></div>
            </td>
        </tr>
        <tr>
            <td>
                <div id="cancelationPolicy">
                    <table><tr><td><h2>Cancelation Policy</h2></td><td></td></tr>
                        <tr><td><span> <?php echo $_smarty_tpl->tpl_vars['cancellationPolicy']->value;?>
</span></td><td></td></tr>
                    </table>
                </div>
                
                <label>   
                   
                    <p> <input id="termsAndConditions" name="termsAndConditions" value="true" type="checkbox" onClick="checkForm(this, 'completeReservationButton')" autocomplete="off" />
By proceeding with this reservation, you agree to all <a href="http://travel.ian.com/index.jsp?pageName=userAgreement&locale=en_US&cid=xxx" target="_blank">Terms and Conditions</a>, which include the Cancellation Policy and all terms and conditions contained in the User Agreement. 
                        You agree to pay the cost of your reservation. If you do not pay this debt and it is collected through the use of a collection agency, an attorney, or through other legal proceedings, 
                        you agree to pay all reasonable costs or fees, including attorney fees and court costs, incurred in connection with such collection effort.</p>
                    
                </label>
            </td>
        </tr>
        <tr>
            <td>
                <input name="currentPage"           type="hidden" value="bookingPage.php"/>
                <input name="hotelId"               type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['hotelId'];?>
"/>
                <input name="supplierType"          type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['supplierType'];?>
"/>
                <input name="roomRateKey"           type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['rateKey'];?>
"/>
                <input name="roomRateCode"          type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['rateCode'];?>
"/>
                <input name="roomTypeCode"          type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['roomTypeCode'];?>
"/>
                <input name="hotelImage"            type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['thumbnailUrl'];?>
"/>
                <input name="hotelName"             type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['hotelName'];?>
"/>
                <input name="roomDescription"       type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['roomTypeString'];?>
"/>
                <input name="averageRate"           type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['averageRate'];?>
"/>
                <input name="total"                 type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['total'];?>
"/>
                <input name="nightlyRateTotal"      type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['nightlyRatesTotal'];?>
"/>
                <input name="surchargeTotal"        type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['surchargeTotal'];?>
"/>
                <input name="currencyCode"          type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['hotelinfo']->value['currencyCode'];?>
"/>
                <input name="contactDetails_email" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['contactinfo']->value['email'];?>
" />
                <input name="contactDetails_confirmEmail" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['contactinfo']->value['confirmEmail'];?>
" />
                <input name="contactDetails_phoneNumber" type="hidden"  value="<?php echo $_smarty_tpl->tpl_vars['contactinfo']->value['phone'];?>
" />
                <?php  $_smarty_tpl->tpl_vars['guest'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['guest']->_loop = false;
 $_smarty_tpl->tpl_vars['ind'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['contactinfo']->value['rooms']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['guest']->key => $_smarty_tpl->tpl_vars['guest']->value){
$_smarty_tpl->tpl_vars['guest']->_loop = true;
 $_smarty_tpl->tpl_vars['ind']->value = $_smarty_tpl->tpl_vars['guest']->key;
?>
                <input name="guest_firstName<?php echo $_smarty_tpl->tpl_vars['ind']->value;?>
" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['guest']->value['firstname'];?>
" />
                <input name="guest_lastName<?php echo $_smarty_tpl->tpl_vars['ind']->value;?>
" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['guest']->value['lastname'];?>
" />
                <input name="rooms<?php echo $_smarty_tpl->tpl_vars['ind']->value;?>
_smokingPreferenceId" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['guest']->value['smokingPreference'];?>
" />
                <?php } ?>
                
            </td>
        </tr>
        <tr>
            <td align="right">
                <button id="completeReservationButton" disabled type="submit"  name="book" value="book">
                    Complete Reservation
                </button>
            </td>
        </tr>
    </table>
    </form>
</div>

    <script>
        $(document).ready(function() {
            if($("#country_US_states option:selected").val() === "US"){
                showState();
            } else {
                hideState();
            }
        });
    var hideState = function(){
        $("#stateField.active").removeClass("active").addClass("inactive");
        $("#stateLebel.active").removeClass("active").addClass("inactive");
    }, showState = function(){
        $("#stateField.inactive").removeClass("inactive").addClass("active");
        $("#stateLebel.active").removeClass("active").addClass("inactive");
    };
    </script>
<?php }} ?>